package org.spiderflow.core.expression.parsing.ast;

import org.spiderflow.core.expression.parsing.Span;

/**
 * All expressions are subclasses of this node type. Expressions are separated into unary operations (!, -), binary operations
 * (+, -, *, /, etc.) and ternary operations (?:).
 *
 * @author zhaoshihao
 * @version 2021/11/9 14:34
 */
public abstract class Expression extends Node {
    protected static final Object FAIL_FLAG = new Object();

    protected Expression(Span span) {
        super(span);
    }

    protected boolean isSuccess(Object obj) {
        return obj != FAIL_FLAG;
    }
}
